AsyncSerpProvider

Experimental rewrite of SerpProvider based on async development practices.

Properties

Link copied to clipboard
open val id: String

A unique ID that identifies this provider.

Link copied to clipboard
abstract val providerInfo: ProviderInfo?

Information about this provider, like the name and description.

Functions

Link copied to clipboard
open fun ConfigComposable(modifier: Modifier, toggleNextButton: (Boolean) -> Unit, context: Context, requestCredentials: (Array<Credential>, (Map<Credential, String>) -> Unit) -> Unit)

A Composable which provides options to set up the SERP provider (e.g. input fields for any required API keys or username and password fields).

Link copied to clipboard

Get any sensitive credential keys.

Link copied to clipboard

Get the values of any sensitive credentials, e.g. API keys and passwords.

Link copied to clipboard
abstract suspend fun search(query: String): List<Result>

Perform a web search for the provided query and return the results.

Link copied to clipboard
open fun useSensitiveCredentials(credentials: Map<Credential, String>)

Gets called by the app after it loads the user's sensitive credentials (e.g. API keys and passwords) for this provider.